package com.bucg.cjcloud.gb28181.sip.process;

import com.bucg.cjcloud.gb28181.sip.modle.ResponseModel;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.sip.message.Request;

/**
 * DeviceInfoRequestProcess..
 *
 * @author Lizhong
 * @date 2020/3/5
 */
@Component
@Order(2)
public class DeviceInfoRequestProcess implements RequestProcess {
    @Override
    public ResponseModel processRequest(Request req, String cmdType) {
        System.out.println( new String(req.getRawContent()));
        return ResponseModel.builder().statusCode(200).build();
    }

    @Override
    public boolean isSupport(Request req, String cmdType) {

        return cmdType!=null && cmdType.equalsIgnoreCase("DeviceInfoEntity");
    }
}
